/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package coverter;

import entities.AccionEstrategica;
import entities.Area;
import entities.Dependencia;
import entities.Estatus;
import entities.Objetivo;
import entities.Persona;
import entities.Prioridad;
import entities.Responsable;
import entities.Usuario;
import java.util.Date;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.convert.FacesConverter;

/**
 *
 * @author Agapo
 */
@FacesConverter("accionEstrategicaConverter")
public class AccionEstrategicaConverter implements  Converter{

    @Override
    public Object getAsObject(FacesContext context, UIComponent component, String value) {
        AccionEstrategica ae=new AccionEstrategica();
        ae.setIdAccionEstrategica(Integer.parseInt(value));
        return ae;  
    }

    @Override
    public String getAsString(FacesContext context, UIComponent component, Object value) {
        AccionEstrategica ae=(AccionEstrategica)value;
            String accion=""+ae.getIdAccionEstrategica();
        return  accion;
    }
    
}
